#ifndef MAINGAME_H_
#define MAINGAME_H_

#include <iostream>
#include <stdio.h>
#include "../Core/D3DGame.h"

class MainGame : public D3DGame
{
public:
	MainGame( HINSTANCE hInstance );
	~MainGame();

	void initApp();
	void onResize();
	void onUpdateScene( float dt );
	void drawScene();
};

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance,
	PSTR cmdLine, int showCmd)
{
#if defined(DEBUG) | defined(_DEBUG)
	_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif
	
	MainGame game(hInstance);
	
	game.initApp();

	return game.run();
}

MainGame::MainGame( HINSTANCE hInstance )
	: D3DGame(hInstance)
{

}

MainGame::~MainGame()
{

}

void MainGame::initApp( void )
{
	D3DGame::initApp();
}

void MainGame::onResize( void )
{
	D3DGame::onResize();
}

void MainGame::onUpdateScene( float dt )
{
	D3DGame::onUpdateScene(dt);
}

void MainGame::drawScene( void )
{
	D3DGame::drawScene();

	RECT R = { 5, 5, 0, 0 };
	m_pFont->DrawText( 0, m_FrameStat.c_str(), -1, &R, DT_NOCLIP, BLACK );

	m_pSwapChain->Present(0, 0);
}


#endif





